package com.hanfu.ucenter.web.enums;

import java.io.Serializable;

/**
 * Created by dufei on 19/9/18.
 */
public interface UcenterEnum extends Serializable {


    /**
     * 实名认证   0未认证   1已认证   2审核中   3未通过
     *
     */
    enum AuthStatus implements UcenterEnum {

        INIT(0, "未认证"),
        SUC(1, "已认证"),
        OPING(2, "审核中"),
        FAIL(3, "未通过"),;

        AuthStatus(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        private Integer value;

        private String name;

        public Integer getValue() {
            return value;
        }

        public void setValue(Integer value) {
            this.value = value;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public static AuthStatus getByValue(Integer value) {
            for (AuthStatus status : values()) {
                if (status.getValue().equals(value)) {
                    return status;
                }
            }
            return null;
        }
    }


    /**
     * /**
     '0001'  => '法人身份证',
     '0011'  => '身份证反面',
     '0002'  => '商户营业执照(个人商户或企业商户必传)',
     '0003'  => '商户税务登记证',
     '0004'  => '组织机构代码证',
     '0005'  => '门头照片',
     '0006'  => '开户许可证',
     '0007'  => '自拍照(手持身份证)',
     '0008'  => '辅助证明材料',
     '0012'  => '授权证书',
     '0013'  => '辅助证明材料1',
     '0014'  => '辅助证明材料2',
     '0015'  => '室内照片',
     '0016'  => '租赁协议',
     '0017'  => '产权证明',
     '0018'  => '执业资质证照',
     '0019'  => '第三方证明',
     '0020'  => '其他小微商户证明材料',
     '0021'  => '经营商品照片',
     '0099'  => '其他材料',
     */
    enum uploadType implements UcenterEnum {

        SFZ("0001", "法人身份证"),
        FM("0011", "身份证反面"),
        ZZ("0002", "商户营业执照(个人商户或企业商户必传)"),
        DJ("0003", "商户税务登记证"),
        JG("0004", "组织机构代码证"),
        MT("0005", "门头照片"),
        XK("0006", "开户许可证"),
        ZP("0007", "自拍照(手持身份证)"),
        FZ("0008", "辅助证明材料"),
        SQ("0012", "授权证书"),
        FZ1("0013", "辅助证明材料1"),
        FZ2("0014", "辅助证明材料2"),
        SN("0015", "室内照片"),
        ZL("0016", "租赁协议"),
        CQ("0017", "产权证明"),
        ZY("0018", "执业资质证照"),
        DS("0019", "第三方证明"),
        XW("0020", "其他小微商户证明材料"),
        SP("0021", "经营商品照片"),
        QT("0099", "其他材料"),;

        uploadType(String value, String name) {
            this.value = value;
            this.name = name;
        }

        private String value;

        private String name;

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public static uploadType getByValue(String value) {
            for (uploadType status : values()) {
                if (status.getValue().equals(value)) {
                    return status;
                }
            }
            return null;
        }
    }

}
